package javabase.schoolwork.day6_15;
import java.io.*;

/**
 * @author fance
 * @date 18-6-16 上午9:03
 */
public class ProxyClient {
    public static void main(String[] args) throws FileNotFoundException {
        BufferedWriter writer = new BufferedWriter(
                new OutputStreamWriter(new FileOutputStream(new File("src/javabase/schoolwork/day6_15/test.properties"))
                ));
       /* HelloProxy proxy = new HelloProxy(writer);
        proxy.fun1();
        proxy.fun1();
        proxy.fun1();*/

       HelloImpl hello = new HelloImpl();
       DynamicProxy dynamicProxy = new DynamicProxy(hello,writer);
        IHello iHello = dynamicProxy.getProxy();
        iHello.fun1();
        iHello.fun1();
        iHello.fun1();
        iHello.fun1();

    }
}
